package com.jsb.laundry.dao;

import com.jsb.laundry.model.dto.UserInfoCenterDto;
import com.jsb.laundry.model.entity.CouponUserBag;
import com.jsb.laundry.model.entity.UserAddress;
import com.jsb.laundry.model.entity.UserBankCard;
import com.jsb.laundry.model.entity.UserDetail;
import com.jsb.laundry.model.v1.MyInfo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.HashMap;
import java.util.List;

public interface UserInfoCenterDao {

    List<UserInfoCenterDto.GuessYouLike> getLaundryActivityModel(String cateId);

    /**
     * 查询用户收货地址
     */
    List<UserAddress> findUserAddressByUserId(@Param("userId") String uid);

    /**
     * 新添加地址时，把其他地址改为非默认(0)
     */
    int updAddressNotDefault(String userId);

    /**
     * 保存洗衣用户的填写地址
     */
    int saveAddress(UserAddress data);

    /**
     * 更新收货地址
     */
    int updAddress(UserAddress data);

    /**
     * 设置当前地址为默认(1)
     *
     * @param userId
     * @return
     */
    int updAddressDefault(@Param("userId") String userId,@Param("ID") String userAddressId);

    int updateUserDetailById(UserDetail userDetail);

    MyInfo findByMy(String userId);

    HashMap accountBalancePage(String userId);

    int checkBankCard(String userId);

    int addBankCard(UserBankCard userBankCard);

    List<UserBankCard> findBankInfoByUserId(String userId);

    HashMap<String, String> userBankInfo(@Param("userId") String userId,@Param("id")  String id);

    Date findWithdrawalTime(String userId);

    int addUserStreamRecord(CouponUserBag couponRecord);

    int outAccountMoney(CouponUserBag couponRecord);
}
